package com.wish.blessingroad.controller;


import com.wish.blessingroad.common.ResponseResult;
import com.wish.blessingroad.entity.User;
import com.wish.blessingroad.service.IUserService;
import com.wish.blessingroad.util.JedisUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author dhc
 * @since 2019-02-18
 */
@Controller
@RequestMapping("/blessingroad/user")
public class UserController {
    private static final Logger LOG = LoggerFactory.getLogger(UserController.class);

    @Autowired
    private JedisUtil jedisUtil;
    @Autowired
    private IUserService userServiceImpl;

    /**
     *
     */
    @ResponseBody
    @RequestMapping(value = "/getUser")
    public Object getUser(){

        return new ResponseResult<>("").success();
    }
    /**
     * 查邀请人祈福值总数
     * id 用户id
     */
    @ResponseBody
    @RequestMapping(value = "/getInviteUser")
    public Object getInviteUser(int id){
        return new ResponseResult<>(userServiceImpl.getUserFree(id)).success();
    }

}

